<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Medium
  </div>
  <div>
   <h1 class="question_title">
    406. Queue Reconstruction by Height
   </h1>
   <p>
    Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers
    <code>
     (h, k)
    </code>
    , where
    <code>
     h
    </code>
    is the height of the person and
    <code>
     k
    </code>
    is the number of people in front of this person who have a height greater than or equal to
    <code>
     h
    </code>
    . Write an algorithm to reconstruct the queue.
   </p>
   <p>
    <b>
     Note:
    </b>
    <br>
    The number of people is less than 1,100.
   </p>
   <br>
   <p>
    <b>
     Example
    </b>
   </p>
   <pre>
Input:
[[7,0], [4,4], [7,1], [5,0], [6,1], [5,2]]

Output:
[[5,0], [7,0], [5,2], [6,1], [4,4], [7,1]]
</pre>
  </div>
  <div>
   <h1 class="question_title">
    406. 根据身高重建队列
   </h1>
   <p>
    假设有打乱顺序的一群人站成一个队列。 每个人由一个整数对
    <code>
     (h, k)
    </code>
    表示，其中
    <code>
     h
    </code>
    是这个人的身高，
    <code>
     k
    </code>
    是排在这个人前面且身高大于或等于
    <code>
     h
    </code>
    的人数。 编写一个算法来重建这个队列。
   </p>
   <p>
    <strong>
     注意：
    </strong>
    <br>
    总人数少于1100人。
   </p>
   <p>
    <strong>
     示例
    </strong>
   </p>
   <pre>
输入:
[[7,0], [4,4], [7,1], [5,0], [6,1], [5,2]]

输出:
[[5,0], [7,0], [5,2], [6,1], [4,4], [7,1]]
</pre>
  </div>
 </body>
</html>